<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><s:property value="getText('title.chonloainguoidung')"/></title>



<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
  <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
  <script src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>
  <link rel="stylesheet" href="/resources/demos/style.css" />
  <script>
  $(function() {
    $( "#dialog-modal" ).dialog({
      height: 140,
      modal: true
    });
  });
  </script>

<script type="text/javascript">
	function Show_RegisterForm() {
		/* cach khac
		 var e = document.getElementById("i_lngd");
		 var str = e.options[e.selectedIndex].text;
		 */

		var e = document.getElementById("i_lngd");
		var selectedType = e.options[e.selectedIndex];

		if (selectedType.value != "None") {
			if (selectedType.value == "DN") {
				window.location = "\Register_Business.html";
			} else {
				window.location = "\Register_Consumer.html";
			}
		}
	}
</script>

</head>
<body>
<div id="dialog-modal" title="Chọn loại người dùng">
<center>
	<s:form action="RegisterTypeAction" method="post"
		enctype="multipart/form-data">
		<td><select onchange="Show_RegisterForm()" name="loainguoidung"
			id="i_lngd" style="width: 240px;">
				<option value="None">--<s:property value="getText('option.chonnguoidung')"/>--</option>
				<option value="DN"><s:property value="getText('option.doanhnghiep')"/></option>
				<option value="KH"><s:property value="getText('option.khachhang')"/></option>
		</select></td>
	</s:form>
</center>
</div>
</body>
</html>